import React from 'react';
import { Link, useRouteMatch } from "react-router-dom";
import routes from '../../routes/index';
function NavPage() {
  const { url } = useRouteMatch();
  return (
    <div>
      <h1>404 > {url}</h1>
      <ol className='g-mb30'>
        <li><Link to='/entry?type=0'>绑定功能</Link></li>
        <li><Link to='/entry?type=1'>预约功能</Link></li>
        <li><Link to='/entry?type=2'>开单支付</Link></li>
        <li><Link to='/outUser/company?hosId=3'>企业简介</Link></li>
      </ol>
      <ol>
        {routes.map((v,i)=>{
          // if(v.path.indexOf('/user') !== 0) {
            return (<li className='g-m10' key={i}><Link to={v.path}>{v.title}</Link></li>)
          // }
          // return '';
        })}
      </ol>
      <button onClick={()=>{localStorage.clear()}} style={{width:300,height:100}}>清缓存</button>
    </div>
  )
}

export default NavPage;

/**
 * http://work.arsmo.cn/entry?url=xxx
 *
 * <ol className='g-mb30'>
 <li><Link to='/user?type=0&outUserId=wm5eQUBgAAn5fM0bMHjjod7lZL8Ah9Pg'>绑定功能</Link></li>
 <li><Link to='/user?type=1&outUserId=wm5eQUBgAAn5fM0bMHjjod7lZL8Ah9Pg'>预约功能</Link></li>
 <li><Link to='/goods/order?type=1&outUserId=wm5eQUBgAAn5fM0bMHjjod7lZL8Ah9Pg'>开单支付</Link></li>
 </ol>


 */